#ifndef TEXTBUTTON_H
#define TEXTBUTTON_H

#include <QWidget>
#include <QPushButton>
#include <QEvent>

#include <QMouseEvent>

class TextButton : public QPushButton{      // 重载按钮点击事件，获取点击按钮的text
    Q_OBJECT
public:
    TextButton(QWidget *parent = nullptr);
    TextButton(QString text, QWidget *parent = nullptr);
signals:
    void clickedText(QString text);
protected:
    void mouseReleaseEvent(QMouseEvent * event) override;
};

#endif // TEXTBUTTON_H
